<style type="text/css">
	#overlay { display: block;}
</style>
<input name="action" value="updateitem" type="hidden" />
<input name="item" value="<?php echo $item ?>" type="hidden" />
<form class="form" method="POST">
	<div id="main" class="curve">
		<div id="overlay" class="curve"></div>
		<!--overlay-->
		<h2><?php echo $ptitle; ?></h2>
		
		<div class="section">
			<h4>Personal Information</h4>
			<div class="row">
				<input type="hidden" name="image_name" />
				<input type="hidden" name="image_size" />
				<input type="hidden" name="image_data" />
				<label class="float-left">User Image:</label>
				<img width="100" src="" id="image_id" class="float-left" />
				<a href="javascript:void(0)" class="upload">
                	<span>
                    <div id="home_upload" class="home_upload">
                      <noscript>          
	                      <p>Please enable JavaScript to use file uploader.</p>
                      <!-- or put a simple form for upload here -->
                      </noscript>       
                    </div>
                  </span>
                </a>
				<div class="clear"></div>
			</div>			
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Employee No.:<span class="req">*</span></label>
					<input name="employee_no" id="employee_no" title="Employee Number" class="validate[required], ajax[isEmpNoAvailable]" />
				</div>
				<div class="div-right">
					<label>Gender:<span class="req">*</span></label>
					<select name="gender_id" id="gender_id" title="Gender" class="validate[required]">
						<option value="" selected="selected">- Select -</option>
						<?php foreach($genders as $g) echo "<option value='$g->gender_id'>$g->gender_name</option>"; ?>
					</select>
				</div>
				<div class="clear"></div>
			</div>			
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>First Name:<span class="req">*</span></label>
					<input name="firstname" id="firstname" title="First Name" class="validate[required]" />
				</div>
				<div class="div-right">
					<label>Middle Name:<span class="req">*</span></label>
					<input name="middlename" id="middlename" title="Middle Name" class="validate[required]" />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Last Name:<span class="req">*</span></label>
					<input name="lastname" id="lastname" title="Last Name" class="validate[required]" />
				</div>
				<div class="div-right">
					<label>Nickname:<span class="req">*</span></label>
					<input name="nickname" id="nickname" title="Nickname" class="validate[required]" />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->	
			<div class="row">		
				<div class="div-left">
					<label>Spouse Name:</label>
					<input name="spouse_name" id="spouse_name" title="Spouse Name"  />
				</div>
				<div class="div-right">
					<label>Birthday:</label>
					<input name="birthday" id="birthday" title="Birthday" class="validate[custom[dateFormat]] datep"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->			
		</div>
		<!--section-->
		
		<div class="section">
			<h4>Address</h4>
			<div class="row">		
				<div class="div-left">
					<label>Present Address 1:</label>
					<input name="present_address1" id="present_address1" title="Address 1"  />
				</div>
				<div class="div-right">
					<label>Present Address 2:</label>
					<input name="present_address2" id="present_address2" title="Address 2"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Present District:</label>
					<input name="present_district" id="present_district" title="District"  />
				</div>
				<div class="div-right">
					<label>Present Town/City:</label>
					<input name="present_towncity" id="present_towncity" title="Town/City"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Mobile No:</label>
					<input name="mobile_number" id="mobile_number" title="Mobile Number" class="validate[custom[phone]]"  />
				</div>
				<div class="div-right">
					<label>Landline No:</label>
					<input name="landline_number" id="landline_number" title="Landline Number" class="validate[custom[phone]]" />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
		</div>
		<!--section-->
		
		<div class="section">
			<h4>Emeregency Contact Information</h4>
			<div class="row">		
				<div class="div-left">
					<label>Contact Person:</label>
					<input name="name_of_contact_person" id="name_of_contact_person" title="Contact Person"  />
				</div>
				<div class="div-right">
					<label>Relation to Employee:</label>
					<input name="relation_to_employee" id="relation_to_employee" title="Address 2"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Emergency Mobile No:</label>
					<input name="emergency_contact_no" id="emergency_contact_no" title="Emergency Mobile Number" class="validate[custom[phone]]" />
				</div>
				<div class="div-right">
					<label>Emergency Landline No:</label>
					<input name="emergency_landline_no" id="emergency_landline_no" title="Emergency Landline Number" class="validate[custom[phone]]" />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
		</div>
		<!--section-->
		
		<div class="section">
			<h4>Account Information</h4>
			<div class="row">		
				<div class="div-left">
					<label>Username:<span class="req">*</span></label>
					<input name="username" id="username" title="Username" class="validate[required], ajax[isUsernameAvailable]" />
				</div>
				<div class="div-right">
					<label>Email:<span class="req">*</span></label>
					<input name="email" id="email" title="Email" class="validate[required,custom[email]], ajax[isEmailAvailable]" />
				</div>
				<div class="clear"></div>
			</div>			
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>Password:</label>
					<input name="password" id="password" title="Password" class="" />
					<!--<a href="javascript:void(0)" class="show-password" ></a>-->
				</div>
				<div class="div-right">
					<label>Role:<span class="req">*</span></label>
					<select name="role_id" id="role_id" Title="Role" class="validate[required]">
						<option value="" selected="selected">- Select -</option>
						<?php foreach($roles as $r) echo "<option value='$r->role_id'>$r->role_name</option>"; ?>
					</select>
				</div>
				<div class="clear"></div>
			</div>	
			<!--row-->
			<div class="row">
				<p>
					<label>&nbsp;</label>
					<a href="javascript:void(0)" class="generate-password">Generate New Password</a>
				</p>
				<p>
					<label>&nbsp;</label>
					<span>(The password will be automatically sent to the email.)</span>
				</p>
			</div>	
			<!--row-->
			
		</div>
		<!--section-->
		
		<div class="section">
			<h4>Company Information</h4>
			
			<div class="row">
				<div class="div-left">
					<!--<label>Team Name:</label>
					<select id="group_id" Title="Team Name" class="team_name">
						<option value="" selected="selected">- Select -</option>
						<?php foreach($groups as $g) echo "<option value='".$g['group_id']."'>".$g['group_name']."</option>"; ?>
					</select>-->
					<label>Position:</label>				
					<select name="position_id" id="position_id" Title="Position">
						<option value="0" selected="selected">- Select -</option>
						<?php foreach($positions as $p) echo "<option value='".$p['position_id']."'>".$p['position_name']."</option>"; ?>						
					</select>
				</div>
				<div class="div-right">					
					<label>Is Out of Office:</label>
					<select name="is_out_of_office" id="is_out_of_office" title="Is Out of Office">
						<option value="0">No</option>
						<option value="1">Yes</option>
					</select>
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			
			<div class="row">
				<div class="div-left">
					<label>Time Card No:</label>
					<input name="timecard_no" id="timecard_no" title="Time Card Number"  />
				</div>
				<div class="div-right">
					<label>Shift:<span class="req">*</span></label>				
					<select name="shift_id" id="shift_id" Title="Shift" class="validate[required]">
						<option value="" selected="selected">- Select -</option>
						<?php foreach($shifts as $s) echo "<option value='$s->shift_id'>$s->shift_name</option>"; ?>
					</select>
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			
			<div class="row">
				<div class="div-left">
					<label>Date Hired:</label>
					<input name="date_hired" id="date_hired" title="Date Hired" class="validate[custom[dateFormat]] datep"  />
				</div>
				<div class="div-right">
					<label>Status:<span class="req">*</span></label>				
					<select name="employee_status_id" id="employee_status_id" Title="Employee Status" class="validate[required]">
						<option value="" selected="selected">- Select -</option>
						<?php foreach($empstatus as $e) echo "<option value='$e->employee_status_id'>$e->es_name</option>"; ?>
					</select>
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			
			<div class="row">
				<div class="div-left">
					<label>Regularization Date:</label>				
					<input name="regularization_date" id="regularization_date" title="Regularization Date" class="validate[custom[dateFormat]] datep"  />					
				</div>
				<div class="div-right">
					<label>Resignation Date:</label>
					<input name="resignation_date" id="resignation_date" title="Resignation Date" class="validate[custom[dateFormat]] datep" />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->			
			
		</div>
		<!--section-->
		
		<div class="section">
			<h4>Government Information</h4>
			<div class="row">		
				<div class="div-left">
					<label>SSS No.:</label>
					<input name="sss_no" id="sss_no" title="SSS Number"  />
				</div>
				<div class="div-right">
					<label>Philhealth No.:</label>
					<input name="philhealth_no" id="philhealth_no" title="Philhealth Number"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
			<div class="row">		
				<div class="div-left">
					<label>PAGIBIG No.:</label>
					<input name="pagibig_no" id="pagibig_no" title="PAGIBIG Number"  />
				</div>
				<div class="div-right">
					<label>TIN No.:</label>
					<input name="tin_no" id="tin_no" title="TIN Number"  />
				</div>
				<div class="clear"></div>
			</div>
			<!--row-->
		</div>
		<!--section-->
		
		<div class="section">
			<div class="row float-right">
				<a href="<?php echo base_url().$module ?>/manage.html" class="submit-small"><span>Return</span></a>
				<a href="javascript:void(0)" class="submit-small" id="form-submit"><span>Save</span></a>
				<div class="clear"></div>
			</div>
		</div>
		<!--section-->
		
	</div>
	<!--main-->
</form>